﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo01
{
    class Demo05
    {
       
        static void Main(string[] args)
        {
            Console.WriteLine("请用户输入边长");
            string a = Console.ReadLine();
            int b = Convert.ToInt32(a);
            for (int i = 0; i <b; i++)
            {
                for (int j = 0; j < b; j++)
                {
                    if (i == 0||j==0||i==b-1||j==b-1)
                    {
                        Console.Write(" *");
                    }
                    else
                    {
                        Console.Write("  ");
                    }
                }
                Console.WriteLine();
            }
        }
    }
}
